package booksystem;

/**
 * @TODO
 * @Author xu
 * 2025/3/17
 */
public class Book {
    private String title; // 书名
    private String author; // 作者
    private String isbn; // ISBN号码

    // 构造函数
    public Book(String title, String author, String isbn) {
        this.title = title;
        this.author = author;
        this.isbn = isbn;
    }

    // Getter和Setter方法
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getIsbn() {
        return isbn;
    }

    public void setIsbn(String isbn) {
        this.isbn = isbn;
    }

    // 重写toString方法，方便输出书籍信息
    @Override
    public String toString() {
        return "书名: " + title + ", 作者: " + author + ", ISBN: " + isbn;
    }
}
